<div class="wrapper wrapper-content fadeInRight" ng-controller="bannerCtr">
    <div class="row">
        <div class="col-sm-12">
            <div class="ibox float-e-margins">
                <div class="ibox-title">
                    <h5>图片列表</h5>
                </div>
                <div class="ibox-content">
                    <div class="tabs-conttainer">
                        <button class="btn btn-warning pull-right" style="margin-top: 5px" access="BannerSave" ng-click="edit()">添加</button>
                    </div>
                    <table class="table table-bordered table-hover" style="text-align:center;">
                        <thead>
                        <tr>
                            <td>序号</td>
                            <td>图片</td>
                            <td>排序值(正序)</td>
                            <td>添加时间</td>
                            <td>操作</td>
                        </tr>
                        </thead>
                        <tbody>
                        <tr ng-repeat="item in data.list">
                            <td>{{item.id}}</td>
                            <td><img ng-src="{{item.image}}" height="50px"></td>
                            <td>{{item.sort}}</td>
                            <td>{{item.create_time}}</td>
                            <td>
                                <a class="btn btn-xs btn-warning" access="BannerSave" ng-click="edit(item)">编辑</a>
                                <a class="btn btn-xs btn-danger" access="BannerDel" ng-click="del(item)">删除</a>
                            </td>
                        </tr>
                        <tr no-data="data.list"></tr>
                        </tbody>
                    </table>
                    <div admin-page="data.pages" curr-page="data.search.page" datas-count="data.count" callback="getList"></div>
                </div>

            </div>
        </div>
    </div>

    <div class="modal fade" id="myModal" tabindex="1" role="dialog" data-backdrop="false" style="margin: 20px 0 50px 70px">
        <div class="modal-dialog modal-lg" role="document" style="width: 1200px">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-label="close"><span
                            aria-hidden="true">&times;</span></button>
                    <h4 class="modal-title" id="myModalLabel">编辑</h4>
                </div>
                <div class="modal-body" ng-if="data.viewImg">
                    <form class="form-horizontal" id="editForm">
                        <div class="form-group">
                            <label class="col-sm-2 control-label">排序值（正序）<span style="color:red">*</span></label>
                            <div class="col-sm-8">
                                <input class="form-control " ng-model="data.edit.sort" placeholder="排序值">
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">图片<span style="color:red">*</span></label>
                            <div class="col-sm-8">
                                <div class="row row_progress_box">
                                    <div class="col-sm-10">
                                        <input class="form-control " ng-model="data.edit.image" placeholder="图片地址">
                                    </div>
                                    <button type="button" class="btn btn-primary" id="uploadViewImage2" ng-model="data.edit.image" upload-oss accept="image" upload-ing="data.uploading">
                                        <i class="fa fa-upload"></i>
                                        <span class="bold">上传</span>
                                    </button>
                                </div>
                            </div>
                        </div>
                    </form>
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-defualt" data-dismiss="modal">取消</button>
                    <button type="button" class="btn btn-primary" ng-click="commit()" access="BannerSave">保存</button>
                </div>
            </div>
        </div>
    </div>
</div>